package cn.itcast.mq.helloworld;


import org.junit.jupiter.api.Test;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class workQueue {
    
    @Autowired
    private RabbitTemplate rabbitTemplate;
    @Test
    public void testWorkQueue() throws InterruptedException {
        for (int i = 0; i < 10; i++) {
            rabbitTemplate.convertAndSend("simple.queue","hello word!"+i);
            Thread.sleep(1000);
        }
    }


    
}
